Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix license cmd #2351

Merged
merged 4 commits into from Oct 12, 2018
Merged

Fix license cmd #2351

merged 4 commits into from Oct 12, 2018

Conversation

lbudai
Copy link
Collaborator

@lbudai lbudai commented Oct 11, 2018

@czanik : FYI

(GCompareFunc)control_command_start_with_command);
if (!command_it)
{
msg_error("Failed to replace control command",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm... I think we could register the command when we want to replace a non-existent (and print a warning msg): I'll change it.

@kira-syslogng
Copy link
Contributor

Build SUCCESS

1 similar comment
@kira-syslogng
Copy link
Contributor

Build SUCCESS

{
msg_warning("Trying to replace a non-existent command. Command will be registered as a new command.",
evt_tag_str("command", command_name));
control_register_command(command_name, description, function, user_data);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the warning here?

If we do, I think we need a bit more context, like mentioning that this was a control socket command, but I like the idea that modules can register such stuff.

But all in all I would make this msg_debug().

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed to debug

bazsi
bazsi previously approved these changes Oct 11, 2018
furiel
furiel previously approved these changes Oct 12, 2018
Copy link
Collaborator

@furiel furiel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From security point if view, I would sleep better if modules cannot change behavior of existing commands. I would probably have deleted the option if it is not needed, and allow modules to register their own commands as new commands. Other than that, the changeset looks good to me.

@gaborznagy gaborznagy self-requested a review October 12, 2018 08:29
@gaborznagy
Copy link
Collaborator

I think nothing protects from re-registering a command with control_register_command, although you cannot override an already registered due to GList find.

We should rethink the control_register_command behaviour.

@lbudai
Copy link
Collaborator Author

lbudai commented Oct 12, 2018

@gaborznagy : fixed

@kira-syslogng
Copy link
Contributor

Build SUCCESS

Signed-off-by: Laszlo Budai <stentor.bgyk@gmail.com>
Signed-off-by: Laszlo Budai <stentor.bgyk@gmail.com>
…ent one

Signed-off-by: Laszlo Budai <stentor.bgyk@gmail.com>
Signed-off-by: Laszlo Budai <stentor.bgyk@gmail.com>
@bazsi
Copy link
Collaborator

bazsi commented Oct 12, 2018 via email

@kira-syslogng
Copy link
Contributor

Build SUCCESS

@szemere szemere merged commit 52844c7 into syslog-ng:master Oct 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants